**Analysis_Appendix.do**

********************************************************************************************************************
********************************************************************************************************************

*This code replicates analyses presented in the Supplementary Online Appendix. Our code for the main paper can be found in the replication file under the name "Analysis_Main.do"

*The code below requires that the following programs are installed: iemargins, tabout, splitvallabels, estout, binsreg, cibar, catplot, and grc1leg

*To install iemargins, run the following code:*
net from "https://github.com/bbdaniels/iemargins/raw/master/"

*Set your working directory so that you can input data, and so that tables and figures are output to an appropriate folder*
cd " "

*Load Data*
use Data.dta, clear

********************************************
********************************************
*3. Descriptive Statistics and Demographics*
********************************************
********************************************

*****************************************************
*Table A2: columns 6 and 7 (# Sessions and Subjects)*
*****************************************************

*Sessions*
by Treatment Ses_num, sort: gen nvals = _n == 1 
*Number of total sessions
count if nvals 
*Number of sessions by treatment
by Treatment: count if nvals 

*Subjects*
by Treatment SubjectID, sort: gen nvals2 = _n == 1 
*Number of total subjects
count if nvals2 
*Number of subjects by treatment
by Treatment: count if nvals2

drop nvals nvals2

******************************************************************
*Table A3: Demographic Summary Statistics by Treatment Assignment*
******************************************************************

preserve
*Only retain period containing demographic information
keep if Period==1 

tabout Gender PartyID Ideology Ethnicity Income Religion Treatment using "Table A3.tex", cells(freq col) clab(Count _%) style(tex) f(0c 1) replace

****************************************************
*Table A4. Additional Demographic Summary Statistics
****************************************************

*Additional Summary Statistics Table
tabout Educ Evangelical Religiosity From_Ohio Foreign Politics_Interest Politics_Discussion Politics_Knowledge Politics_Follow Treatment using "Table A4.tex", cells(freq col) clab(Count _%) style(tex) f(0c 1) replace
restore

***********************************************************
*Figure A4: Distribution of Peak Preferences by Topic Area*
***********************************************************
preserve

*First, reshape to long so that each subject has four observations: one peak preference for each topic*
gen case_id = _n
keep Group_Topic1 Group_Topic2 Group_Topic3 Group_Topic4 SubjectID case_id Treatment Period

reshape long Group_Topic, i(case_id) j(GroupTopic) string

*Only retain period 1, which contains all data on peak preferences by each topic*
*Only retain treatments 1-4*
keep if Period==1 & Treatment<5

ren Group_Topic PeakPref
label define PeakPref_l 1 "Political Left" 2 "Political Middle" 3 "Political Right"
label values PeakPref PeakPref_l

gen Topic=real(GroupTopic)
label values Topic Topic_l

tab PeakPref if Topic==3

splitvallabels PeakPref
catplot Topic PeakPref, ///
percent(Topic) ///
var1opts(label(labsize(small))) ///
var2opts(label(labsize(small)) relabel(`r(relabel)')) ///
ytitle("Percent of Peak Preference Category by Topic Area", size(small)) ///
blabel(bar, format(%4.1f) size(vsmall)) yscale(r(0,55)) ///
intensity(25) ///
asyvars ///
bar(1, color(forest_green) fintensity(inten70)) ///
bar(2, color(dkgreen) fintensity(inten70)) ///
bar(3, color(midgreen) fintensity(inten60)) ///
bar(4, color(eltgreen) fintensity(inten80)) ///
legend(rows(1) stack size(small) ///
order(1 "Welfare" 2 "Taxes" ///
3 "Immigration" ///
4 "Guns") ///
symplacement(center) ///
title(Topic Area, size(small))) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) scheme(s1color)

graph export "Figure A4.pdf", as(pdf) replace
restore

******************************************************************
*Figure A5: Cumulative Distribution Function of Minimum Acceptable 
*Amounts by Topic Area: Left/Right Peak Preference Players Only
******************************************************************

preserve
keep if Treatment<5
tab Topic, gen(Topic)
label var Topic1 Welfare
label var Topic2 Taxes
label var Topic3 Immigration
label var Topic4 Guns

forvalues i=1/4{
forvalues j=1/2{
cumul MAA`j'_T`i' if Period==1 & Group_Topic`i'!=2, gen(cMAA`j'_T`i')
}
}

forvalues j=1/4{
#delimit ;
quietly
line cMAA1_T`j' MAA1_T`j' if Group_Topic`j'!=2 & Period==1, sort(cMAA1_T`j') 
ytitle("Cumulative Probability") xtitle("Minimum Acceptable Amount ($0-$5)") title("`: variable label Topic`j''")
graphregion(fcolor(white) icolor(white) ilcolor(white))
legend(label(1 "Closest Group") label(2 "Furthest Group"))||
line cMAA2_T`j' MAA2_T`j' if Group_Topic`j'!=2 & Period==1, sort (cMAA2_T`j')
ytitle("Cumulative Probability") xtitle("Minimum Acceptable Amount ($0-$5)")
legend(label(1 "Closest Group") label(2 "Furthest Group"))
graphregion(fcolor(white) icolor(white) ilcolor(white))
saving("FigA5_Topic`j'.gph",replace);
};
#delimit ;
grc1leg "FigA5_Topic1.gph" "FigA5_Topic2.gph" "FigA5_Topic3.gph" "FigA5_Topic4.gph",
ycommon xcommon graphregion(fcolor(white) icolor(white) ilcolor(white))  
iscale(0.65) ysize(8)
;
#delimit cr
graph export "Figure A5.pdf", as(pdf) replace
restore

***************************************
*************Footnote 2****************
***************************************
forvalues j=1/4{
preserve
keep if Period==1 & Treatment<5
keep MAA1_T`j' MAA2_T`j' Group_Topic`j'
keep if Group_Topic`j'!=2
gen case_id = _n
reshape long MAA, i(case_id) j(Type) string
ksmirnov MAA, by(Type)
restore
}

******************************************************************
*Figure A6. Cumulative Distribution Function of Minimum Acceptable 
*Amounts by Topic Area: Middle Peak Preference Players Only
******************************************************************

preserve
keep if Treatment<5
tab Topic, gen(Topic)
label var Topic1 Welfare
label var Topic2 Taxes
label var Topic3 Immigration
label var Topic4 Guns

forvalues i=1/4{
forvalues j=1/2{
cumul MAA`j'_T`i' if Period==1 & Group_Topic`i'==2, gen(cMAA`j'_T`i')
}
}

forvalues j=1/4{
#delimit ;
quietly
line cMAA1_T`j' MAA1_T`j' if Group_Topic`j'==2 & Period==1, sort(cMAA1_T`j') 
ytitle("Cumulative Probability") xtitle("Minimum Acceptable Amount ($0-$5)") title("`: variable label Topic`j''")
graphregion(fcolor(white) icolor(white) ilcolor(white))
legend(label(1 "Left Group") label(2 "Right Group"))||
line cMAA2_T`j' MAA2_T`j' if Group_Topic`j'==2 & Period==1, sort (cMAA2_T`j')
ytitle("Cumulative Probability") xtitle("Minimum Acceptable Amount ($0-$5)")
legend(label(1 "Left Group") label(2 "Right Group"))
graphregion(fcolor(white) icolor(white) ilcolor(white))
saving("FigA6_Topic`j'_mid.gph",replace);
};
#delimit ;
grc1leg "FigA6_Topic1_mid.gph" "FigA6_Topic2_mid.gph" "FigA6_Topic3_mid.gph" "FigA6_Topic4_mid.gph",
ycommon xcommon graphregion(fcolor(white) icolor(white) ilcolor(white)) 
iscale(0.65) ysize(8)
;
#delimit cr
graph export "Figure A6.pdf", as(pdf) replace
restore

***************************************
*************Footnote 3****************
***************************************
forvalues j=1/4{
preserve
keep if Period==1 & Treatment<5
keep MAA1_T`j' MAA2_T`j' Group_Topic`j'
keep if Group_Topic`j'==2
gen case_id = _n
reshape long MAA, i(case_id) j(Type) string
ksmirnov MAA, by(Type)
restore
}

******************************************************************
*Figure A7. Voting Thresholds by Non-Preferred Interest Group Type
******************************************************************

*1.) First, for full sample, preferred versus non-preferred interest groups*
preserve
keep if Treatment==1

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("A. Full Sample") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA7_1.gph", replace
restore

*2.) Second, comparison of closest versus furthest non-preferred with preferred*
preserve
keep if Treatment==1 & (MAA1 != MAA2) & MAA1!=. & MAA2!=.

gen VT_NonP_Closest=VT_IG1 if (Bargaining_PeakPref!=1) & ((Bargaining_PeakPref==3 & (MAA2 < MAA1)) | (Bargaining_PeakPref==2 & (MAA1 < MAA2)))
replace VT_NonP_Closest=VT_IG2 if (Bargaining_PeakPref!=2) & ((Bargaining_PeakPref==3 & (MAA1 < MAA2)) | (Bargaining_PeakPref==1 & (MAA1 < MAA2)))
replace VT_NonP_Closest=VT_IG3 if (Bargaining_PeakPref!=3) & ((Bargaining_PeakPref==1 & (MAA2 < MAA1)) | (Bargaining_PeakPref==2 & (MAA2 < MAA1)))

gen VT_NonP_Furthest=VT_IG1 if (Bargaining_PeakPref!=1) & ((Bargaining_PeakPref==3 & (MAA2 > MAA1)) | (Bargaining_PeakPref==2 & (MAA1 > MAA2)))
replace VT_NonP_Furthest=VT_IG2 if (Bargaining_PeakPref!=2) & ((Bargaining_PeakPref==3 & (MAA1 > MAA2)) | (Bargaining_PeakPref==1 & (MAA1 > MAA2)))
replace VT_NonP_Furthest=VT_IG3 if (Bargaining_PeakPref!=3) & ((Bargaining_PeakPref==1 & (MAA2 > MAA1)) | (Bargaining_PeakPref==2 & (MAA2 > MAA1)))

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonP_Closest, gen(cVT_NonP_Closest)
cumul VT_NonP_Furthest, gen(cVT_NonP_Furthest)

stack cVT_Preferred VT_Preferred cVT_NonP_Closest VT_NonP_Closest cVT_NonP_Furthest VT_NonP_Furthest, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonP_Closest "(Closest) Non-Preferred Interest Group"
lab var cVT_NonP_Furthest "Furthest Non-Preferred Interest Group"

sort cVT_Preferred cVT_NonP_Closest cVT_NonP_Furthest

line cVT_Preferred cVT_NonP_Closest cVT_NonP_Furthest VT, title("B. Non-Neutral (MAAs Unequal)") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA7_2.gph", replace

restore

*Third, for those with equal, non-zero MAAs for alternative groups, preferred versus non-preferred

preserve
keep if Treatment==1 & (MAA2 == MAA1) & MAA1!=0 & MAA2!=0 & MAA1!=. & MAA2!=.

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("C. Neutral (MAAs>0)") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA7_3.gph", replace

restore

*Fourth, for those with equal, zero MAAs for alternative groups, preferred versus non-preferred
preserve
keep if Treatment==1 & (MAA2 == MAA1) & MAA1==0 & MAA2==0

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("D. Neutral (MAAs=0)") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA7_4.gph", replace

restore

*Combining Graphs*
grc1leg "FigA7_1.gph" "FigA7_2.gph" "FigA7_3.gph" "FigA7_4.gph", legendfrom("FigA7_2.gph" ) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A7.pdf", as(pdf) replace

***************************************************************************************
*Figure A8. Willingness to Trade Pork and Policy in Experiment 1 (by Majority/Minority)
***************************************************************************************
*Majority Players*
preserve
keep if Treatment==1 & GroupComp==2 & InMajority==1

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("Majority Players") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA8_MajMin_VT_1.gph", replace
restore

*Minority Players*
preserve
keep if Treatment==1 & GroupComp==2 & InMajority==0

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("Minority Players") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA8_MajMin_VT_2.gph", replace
restore

*Combining Graphs*
grc1leg "FigA8_MajMin_VT_1.gph" "FigA8_MajMin_VT_2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A8.pdf", as(pdf) replace

*******************************************************************
*Table A5. Logit Results: Policy Choice by Majority Minority Status
*******************************************************************

preserve
keep if Treatment==1 & GroupComp==2

est clear
qui eststo: logit Alloc_to_pref InMajority PredictedOwn_Indiv
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority PredictedOwn_Indiv, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority PredictedOwn_Indiv i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority PredictedOwn_Indiv i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
		
estout using "Table A5.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(InMajority PredictedOwn_Indiv) /// 
order(InMajority PredictedOwn_Indiv) /// 
varlabels (InMajority "In Ideological Majority" PredictedOwn_Indiv "Equilibrium Prediction: Choose Own") ///
mlabels(none) collabels(none)

restore

*************************************************************
*Table A6. Self-Allocation Amount by Majority Minority Status
*************************************************************

preserve
keep if Treatment==1 & GroupComp==2

est clear
qui eststo: reg allocMe InMajority 
	qui estadd scalar n = e(N)
qui eststo: reg allocMe InMajority, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg allocMe InMajority i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg allocMe InMajority i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
		
estout using "Table A6.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(InMajority) /// 
order(InMajority) /// 
varlabels (InMajority "In Ideological Majority") ///
mlabels(none) collabels(none)
restore

********************************************************************************
*Table A7. Allocation Amount to Partners by Partner Type (Majority Players Only)
********************************************************************************

preserve
keep if Treatment==1 & GroupComp==2 & InMajority==1

*For majority players, we distinguish between majority versus minority transfer partner: 
*Transfer amount to minority player*
gen Trans_ToMin=allocA if A_InMajority==0 & InMajority==1
replace Trans_ToMin=allocB if B_InMajority==0 & InMajority==1
*Transfer amount to other majority player*
gen Trans_OtherMaj=allocA if A_InMajority==1 & InMajority==1
replace Trans_OtherMaj=allocB if B_InMajority==1 & InMajority==1

*Convert to long so that each player has two observations: one allocation to majority partner, 
*and one to minority parner*
gen case_id = _n
keep Trans_ToMin Trans_OtherMaj InMajority SubjectID case_id Period Ses_num

reshape long Trans_, i(case_id) j(AllocationOther) string

*Recode so that 0 reflects allocation to minority partner, 1 to majority partner*
encode AllocationOther, gen(Allocation_Other)
recode Allocation_Other (2=0)

est clear
qui eststo: reg Trans_ Allocation_Other 
	qui estadd scalar n = e(N)
qui eststo: reg Trans_ Allocation_Other, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg Trans_ Allocation_Other i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg Trans_ Allocation_Other i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
		
estout using "Table A7.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(Allocation_Other) /// 
order(Allocation_Other) /// 
varlabels (Allocation_Other "Other Majority Partner") ///
mlabels(none) collabels(none)
restore

********************************************************************************
****Table A8. Policy Choice and Self-Allocation Amount by Status Quo Location***
********************************************************************************

preserve
keep if Treatment==1 & GroupComp==2

recode StatusQuo (1=1) (2=0) (3=0) (4=0) (5=0)

est clear
qui eststo: logit Alloc_to_pref StatusQuo
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref StatusQuo, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref StatusQuo i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref StatusQuo i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg allocMe StatusQuo
	qui estadd scalar n = e(N)
qui eststo: reg allocMe StatusQuo, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg allocMe StatusQuo i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg allocMe StatusQuo i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
			
estout using "Table A8.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(StatusQuo) /// 
order(StatusQuo) /// 
varlabels (StatusQuo "Status Quo Preferred") ///
mlabels(none) collabels(none)
restore

*************************************************************************************************
*********************************Figure A9. Within-subject Voting Thresholds*********************
*************************************************************************************************
*Each participant saw each topic twice, so we can compare their within-topic voting thresholds* 
*Note: correlations even stronger if we limit to majority/minority configurations*
preserve
keep if Treatment==1

tab Topic, gen(Topic)
label var Topic1 Welfare
label var Topic2 Taxes
label var Topic3 Immigration
label var Topic4 Guns

gen Topic_Time=1 if Period<5 & Topic==1
replace Topic_Time=2 if Period<5 & Topic==2
replace Topic_Time=3 if Period<5 & Topic==3
replace Topic_Time=4 if Period<5 & Topic==4
replace Topic_Time=5 if Period>4 & Topic==1
replace Topic_Time=6 if Period>4 & Topic==2
replace Topic_Time=7 if Period>4 & Topic==3
replace Topic_Time=8 if Period>4 & Topic==4

*Welfare
gen Thresh_Wel1A=VT_IG1 if Topic_Time==1
gen Thresh_Wel2A=VT_IG2 if Topic_Time==1
gen Thresh_Wel3A=VT_IG3 if Topic_Time==1

gen Thresh_Wel1B=VT_IG1 if Topic_Time==5
gen Thresh_Wel2B=VT_IG2 if Topic_Time==5
gen Thresh_Wel3B=VT_IG3 if Topic_Time==5

*Taxes
gen Thresh_Tax1A=VT_IG1 if Topic_Time==2
gen Thresh_Tax2A=VT_IG2 if Topic_Time==2
gen Thresh_Tax3A=VT_IG3 if Topic_Time==2

gen Thresh_Tax1B=VT_IG1 if Topic_Time==6
gen Thresh_Tax2B=VT_IG2 if Topic_Time==6
gen Thresh_Tax3B=VT_IG3 if Topic_Time==6

*Immigration
gen Thresh_Imm1A=VT_IG1 if Topic_Time==3
gen Thresh_Imm2A=VT_IG2 if Topic_Time==3
gen Thresh_Imm3A=VT_IG3 if Topic_Time==3

gen Thresh_Imm1B=VT_IG1 if Topic_Time==7
gen Thresh_Imm2B=VT_IG2 if Topic_Time==7
gen Thresh_Imm3B=VT_IG3 if Topic_Time==7

*Guns
gen Thresh_Guns1A=VT_IG1 if Topic_Time==4
gen Thresh_Guns2A=VT_IG2 if Topic_Time==4
gen Thresh_Guns3A=VT_IG3 if Topic_Time==4

gen Thresh_Guns1B=VT_IG1 if Topic_Time==8
gen Thresh_Guns2B=VT_IG2 if Topic_Time==8
gen Thresh_Guns3B=VT_IG3 if Topic_Time==8

sort SubjectID
*Fill in values so that for each individual, all threshold values are listed by topic and period (1-4 or 5-8)
foreach var in Thresh_Wel1A Thresh_Wel2A Thresh_Wel3A Thresh_Wel1B Thresh_Wel2B Thresh_Wel3B Thresh_Tax1A Thresh_Tax2A Thresh_Tax3A Thresh_Tax1B Thresh_Tax2B Thresh_Tax3B Thresh_Imm1A Thresh_Imm2A Thresh_Imm3A Thresh_Imm1B Thresh_Imm2B Thresh_Imm3B Thresh_Guns1A Thresh_Guns2A Thresh_Guns3A Thresh_Guns1B Thresh_Guns2B Thresh_Guns3B {
bysort SubjectID (`var'): replace `var' = `var'[1] if missing(`var')
}

keep if Period==1 

*Welfare
twoway (scatter Thresh_Wel1B Thresh_Wel1A, ms(X)) ///
       (scatter Thresh_Wel2B Thresh_Wel2A, ms(plus)) ///
	   (scatter Thresh_Wel3B Thresh_Wel3A, ms(Sh)) ///
       (lfit Thresh_Wel1B Thresh_Wel1A, pstyle(p1) range(0 10) )  ///
       (lfit Thresh_Wel2B Thresh_Wel2A, pstyle(p2) range(0 10) ) ///
	   (lfit Thresh_Wel3B Thresh_Wel3A, pstyle(p3) range(0 10) ), ///
       legend(order(1 "Left Group" 2 "Middle Group" 3 "Right Group") rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) xlab(, nogrid) ylab(, nogrid) title("Welfare") xtitle("First Voting Threshold") ytitle("Second Voting Threshold") name(FigA9_Welfare, replace) 
	   
*Taxes
twoway (scatter Thresh_Tax1B Thresh_Tax1A, ms(X)) ///
       (scatter Thresh_Tax2B Thresh_Tax2A, ms(plus)) ///
	   (scatter Thresh_Tax3B Thresh_Tax3A, ms(Sh)) ///
       (lfit Thresh_Tax1B Thresh_Tax1A, pstyle(p1) range(0 10) )  ///
       (lfit Thresh_Tax2B Thresh_Tax2A, pstyle(p2) range(0 10) ) ///
	   (lfit Thresh_Tax3B Thresh_Tax3A, pstyle(p3) range(0 10) ), ///
       legend(order(1 "Left" 2 "Middle" 3 "Right") rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) xlab(, nogrid) ylab(, nogrid) title("Taxes") xtitle("First Voting Threshold") ytitle("Second Voting Threshold") name(FigA9_Taxes, replace) 
	   
*Immigration
twoway (scatter Thresh_Imm1B Thresh_Imm1A, ms(X)) ///
       (scatter Thresh_Imm2B Thresh_Imm2A, ms(plus)) ///
	   (scatter Thresh_Imm3B Thresh_Imm3A, ms(Sh)) ///
       (lfit Thresh_Imm1B Thresh_Imm1A, pstyle(p1) range(0 10) )  ///
       (lfit Thresh_Imm2B Thresh_Imm2A, pstyle(p2) range(0 10) ) ///
	   (lfit Thresh_Imm3B Thresh_Imm3A, pstyle(p3) range(0 10) ), ///
       legend(order(1 "Left" 2 "Middle" 3 "Right") rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) xlab(, nogrid) ylab(, nogrid) title("Immigration") xtitle("First Voting Threshold") ytitle("Second Voting Threshold") name(FigA9_Imm, replace) 
	      
	   
*Guns
twoway (scatter Thresh_Guns1B Thresh_Guns1A, ms(X)) ///
       (scatter Thresh_Guns2B Thresh_Guns2A, ms(plus)) ///
	   (scatter Thresh_Guns3B Thresh_Guns3A, ms(Sh)) ///
       (lfit Thresh_Guns1B Thresh_Guns1A, pstyle(p1) range(0 10) )  ///
       (lfit Thresh_Guns2B Thresh_Guns2A, pstyle(p2) range(0 10) ) ///
	   (lfit Thresh_Guns3B Thresh_Guns3A, pstyle(p3) range(0 10) ), ///
       legend(order(1 "Left" 2 "Middle" 3 "Right") rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) xlab(, nogrid) ylab(, nogrid) title("Guns") xtitle("First Voting Threshold") ytitle("Second Voting Threshold")  name(FigA9_Guns, replace) 

*Combine Graphs*
grc1leg FigA9_Welfare FigA9_Taxes FigA9_Imm FigA9_Guns, scheme(s1color) cols(2) ycommon xcommon legendfrom(FigA9_Welfare) 
graph export "Figure A9.pdf", as(pdf) replace
	   
*************************************************************************************************
****************************Table A9. Within-subject Voting Threshold Correlations***************
*************************************************************************************************
*Also referenced in Footnote 4*
corr Thresh_Wel1A Thresh_Wel1B Thresh_Wel2A Thresh_Wel2B Thresh_Wel3A Thresh_Wel3B
matrix list r(C)
version 14.0
putexcel A1=matrix(r(C), names) using "TableA9.xlsx", modify keepcellformat

corr Thresh_Tax1A Thresh_Tax1B Thresh_Tax2A Thresh_Tax2B Thresh_Tax3A Thresh_Tax3B
matrix list r(C)
version 14.0
putexcel A8=matrix(r(C), names) using "TableA9.xlsx", modify keepcellformat

corr Thresh_Imm1A Thresh_Imm1B Thresh_Imm2A Thresh_Imm2B Thresh_Imm3A Thresh_Imm3B
matrix list r(C)
version 14.0
putexcel A15=matrix(r(C), names) using "TableA9.xlsx", modify keepcellformat

corr Thresh_Guns1A Thresh_Guns1B Thresh_Guns2A Thresh_Guns2B Thresh_Guns3A Thresh_Guns3B
matrix list r(C)
version 14.0
putexcel A22=matrix(r(C), names) using "TableA9.xlsx", modify keepcellformat

restore

*************************************************************************************************
****************************Table A10. Logit Results: Policy Choice by Treatment*****************
*************************************************************************************************

preserve
keep if (Treatment==1 | Treatment==3) & GroupComp==2
recode Treatment (1=0) (3=1)
recode InMajority (1=0) (0=1)

gen InMajXTrt=InMajority*Treatment

est clear
qui eststo: logit Alloc_to_pref InMajority Treatment InMajXTrt
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority Treatment InMajXTrt, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority Treatment InMajXTrt i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Alloc_to_pref InMajority Treatment InMajXTrt i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
			
estout using "Table A10.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(InMajority Treatment InMajXTrt) /// 
order(InMajority Treatment InMajXTrt) /// 
varlabels (InMajority "In Ideological Minority" Treatment "Ideology Only Trt" InMajXTrt "Minority X Ideology Only") ///
mlabels(none) collabels(none)
restore

******************************************
*Table A11. Voting Thresholds by Treatment
******************************************

preserve
keep if Treatment==1 | Treatment==2
recode Treatment (1=0) (2=1)
tab Treatment, gen(Trt)

est clear
qui eststo: reg VT_Preferred Trt2
	qui estadd scalar n = e(N)
qui eststo: reg VT_Preferred Trt2, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT_Preferred Trt2 i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT_Preferred Trt2 i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
			
estout using "Table A11.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(Trt2) /// 
order(Trt2) /// 
varlabels (Trt2 "Pork Only") ///
mlabels(none) collabels(none)
restore

**************************************
*Figure A10. Policy and One-way Splits
**************************************

preserve
keep if Treatment==1 | Treatment==2

*Remove label
label var OneWay

iemargins OneWay, treatment(Treatment) vce(cluster SubjectID) ///
graph( subtitle("Means with 95% CIs and Clustered SEs", justification(left) span pos(11)) ytitle("Mean Fraction of One Way Splits") graphregion(color(white) lc(white) lw(med)) bgcolor(white) ylab(,angle(0) nogrid) xtit(" ",placement(center) justification(center)) xla(1 `" "{bf:Pork & Policy}" "' 2 `" "{bf:Pork Only}" "') ylab (0 "0" .05 ".05" .1 ".1" .15 ".15" .2 ".20" .25 ".25") ///
yscale(noline) xscale(noline) legend(region(lc(none) fc(none))) ///
plotopts(lc(white) lw(thin)  fi(100)) ciopts(lc(black)))
graph export "Figure A10.pdf", as(pdf) replace

*Statistics reported in Appendix text*
tab Treatment if Accepted==1, sum(OneWay)
restore

**********************************************************************************
*Table A12. Agreement Rates by Whether Political Preference Information was Shared
**********************************************************************************

preserve
*Distinguishing between treatments with versus without information*
gen Treatment_Info=1 if Treatment==1 | Treatment==2 | Treatment==3 | Treatment==7
replace Treatment_Info=0 if Treatment==4 | Treatment==5 | Treatment==6

est clear
qui eststo: logit Accepted Treatment_Info
	qui estadd scalar n = e(N)
qui eststo: logit Accepted Treatment_Info, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Accepted Treatment_Info i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: logit Accepted Treatment_Info i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
			
estout using "Table A12.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.2f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.2f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(Treatment_Info) /// 
order(Treatment_Info) /// 
varlabels (Treatment_Info "Treatments with Information") ///
mlabels(none) collabels(none)
restore

*****************************************************
*Figure A11. Information Effects on Voting Thresholds
*****************************************************

*Note: For our conditional voting treatment, we have 3 voting thresholds for each IG, (1 for each ID of the proposer). Before, we only had 1 threshold per interest group. So we calculate in the variable VT_IG1 (voting threshold for IG 1)  the mean threshold, that is (VT_IG1_Me+ VT_IG1_A+ VT_IG1_B)/3 where the "_Me", "_A", and "_B" indicate the conditional thresholds on proposer identity. VT_IG2 and VT_IG3 are filled equivalently.

preserve
keep if Treatment==1 | Treatment==2 | Treatment==4 | Treatment==7

*Voting Threshold for Preferred Groups*
gen VT_Preferred_Real=VT_Preferred if Treatment==1
gen VT_Preferred_Real2=VT_Preferred if Treatment==2
gen VT_Preferred_Real4=VT_Preferred if Treatment==4
gen VT_Preferred_Induced=VT_Preferred if Treatment==7

cumul VT_Preferred_Real, gen(cVT_Preferred_Real)
cumul VT_Preferred_Real2, gen(cVT_Preferred_Real2)
cumul VT_Preferred_Real4, gen(cVT_Preferred_Real4)
cumul VT_Preferred_Induced, gen(cVT_Preferred_Induced)

stack cVT_Preferred_Real VT_Preferred_Real cVT_Preferred_Real2 VT_Preferred_Real2 cVT_Preferred_Real4 VT_Preferred_Real4 cVT_Preferred_Induced VT_Preferred_Induced, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred_Real "Pork & Policy"
lab var cVT_Preferred_Real2 "Pork Only"
lab var cVT_Preferred_Real4 "Pork Only No Information"
lab var cVT_Preferred_Induced "Conditional Pork & Policy"

sort cVT_Preferred_Real cVT_Preferred_Induced cVT_Preferred_Real2 cVT_Preferred_Real4
line cVT_Preferred_Real cVT_Preferred_Induced cVT_Preferred_Real2 cVT_Preferred_Real4 VT, title("Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA11_1.gph", replace

restore

*Voting Threshold for Non-Preferred Groups*
preserve
keep if Treatment==1 | Treatment==2 | Treatment==4 | Treatment==7
gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

gen VT_NonPreferred_Real=VT_NonPreferred if Treatment==1
gen VT_NonPreferred_Induced=VT_NonPreferred if Treatment==7

cumul VT_NonPreferred_Real, gen(cVT_NonPreferred_Real)
cumul VT_NonPreferred_Induced, gen(cVT_NonPreferred_Induced)

stack cVT_NonPreferred_Real VT_NonPreferred_Real cVT_NonPreferred_Induced VT_NonPreferred_Induced, into(c VT) wide clear
drop if missing(VT)

lab var cVT_NonPreferred_Real "Pork & Policy"
lab var cVT_NonPreferred_Induced "Conditional Pork & Policy"

sort cVT_NonPreferred_Real cVT_NonPreferred_Induced
line cVT_NonPreferred_Real cVT_NonPreferred_Induced VT, title("Non-Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA11_2.gph", replace

restore

*Combining Graphs*
grc1leg "FigA11_1.gph" "FigA11_2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A11.pdf", as(pdf) replace

******************************************************
*Figure A12. Information Effects on Voting Thresholds*
******************************************************

***A) Majority Players: do thresholds differ for majority (in-group) and minority (out-group) partners?***
preserve
keep if Treatment==7 & GroupComp==2 & InMajority==1

*VT Preferred*
gen VT_Preferred_Real=VT_Pref_InGroup
gen VT_Preferred_Real2=VT_Preferred_Me
gen VT_Preferred_Induced=VT_Pref_OutGroup

cumul VT_Preferred_Real, gen(cVT_Preferred_Real)
cumul VT_Preferred_Real2, gen(cVT_Preferred_Real2)
cumul VT_Preferred_Induced, gen(cVT_Preferred_Induced)

stack cVT_Preferred_Real VT_Preferred_Real cVT_Preferred_Induced VT_Preferred_Induced cVT_Preferred_Real2 VT_Preferred_Real2, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred_Real2 "Self"
lab var cVT_Preferred_Real "Other Majority Partner"
lab var cVT_Preferred_Induced "Minority Partner"

sort cVT_Preferred_Real2 cVT_Preferred_Real cVT_Preferred_Induced
line cVT_Preferred_Real2 cVT_Preferred_Real cVT_Preferred_Induced VT, title("Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA12_Maj1.gph", replace
restore

preserve
keep if Treatment==7 & GroupComp==2 & InMajority==1

*VT Non-Preferred*
gen VT_NonPreferred_Real=VT_NonPref_In
gen VT_NonPreferred_Real2=VT_NonPreferred_Me
gen VT_NonPreferred_Induced=VT_NonPref_Out

cumul VT_NonPreferred_Real, gen(cVT_NonPreferred_Real)
cumul VT_NonPreferred_Real2, gen(cVT_NonPreferred_Real2)
cumul VT_NonPreferred_Induced, gen(cVT_NonPreferred_Induced)

stack cVT_NonPreferred_Real VT_NonPreferred_Real cVT_NonPreferred_Induced VT_NonPreferred_Induced cVT_NonPreferred_Real2 VT_NonPreferred_Real2, into(c VT) wide clear
drop if missing(VT)

lab var cVT_NonPreferred_Real2 "Self"
lab var VT_NonPreferred_Real "Other Majority Partner"
lab var VT_NonPreferred_Induced "Minority Partner"

sort cVT_NonPreferred_Real2 cVT_NonPreferred_Real cVT_NonPreferred_Induced 
line cVT_NonPreferred_Real2 cVT_NonPreferred_Real cVT_NonPreferred_Induced VT, title("Non-Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xlab(0 "0" 2 "2" 4 "4" 6 "6" 8 "8" 10 "10") xtitle("Voting Threshold ($0-$10)") legend(size(vsmall) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA12_Maj2.gph", replace
restore

*Combining Graphs*
grc1leg "FigA12_Maj1.gph" "FigA12_Maj2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A12_A.pdf", as(pdf) replace

***B) Minority Players: do thresholds differ for self and majority partners (we average across them)***
preserve
keep if Treatment==7 & GroupComp==2 & InMajority==0

*VT Preferred*
gen VT_Preferred_Real2=VT_Preferred_Me
gen VT_Preferred_Induced=VT_Pref_OutGroup

cumul VT_Preferred_Real2, gen(cVT_Preferred_Real2)
cumul VT_Preferred_Induced, gen(cVT_Preferred_Induced)

stack cVT_Preferred_Induced VT_Preferred_Induced cVT_Preferred_Real2 VT_Preferred_Real2, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred_Real2 "Self"
lab var cVT_Preferred_Induced "Majority Partner"

sort cVT_Preferred_Real2 cVT_Preferred_Induced
line cVT_Preferred_Real2 cVT_Preferred_Induced VT, title("Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA12_Min1.gph", replace
restore

preserve
keep if Treatment==7 & GroupComp==2 & InMajority==0

*VT Non-Preferred*
gen VT_NonPreferred_Real2=VT_NonPreferred_Me
gen VT_NonPreferred_Induced=VT_NonPref_Out

cumul VT_NonPreferred_Real2, gen(cVT_NonPreferred_Real2)
cumul VT_NonPreferred_Induced, gen(cVT_NonPreferred_Induced)

stack cVT_NonPreferred_Induced VT_NonPreferred_Induced cVT_NonPreferred_Real2 VT_NonPreferred_Real2, into(c VT) wide clear
drop if missing(VT)

lab var cVT_NonPreferred_Real2 "Self"
lab var VT_NonPreferred_Induced "Majority Partner"

sort cVT_NonPreferred_Real2 cVT_NonPreferred_Induced
line cVT_NonPreferred_Real2 cVT_NonPreferred_Induced VT, title("Non-Preferred Interest Group") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xlab(0 "0" 2 "2" 4 "4" 6 "6" 8 "8" 10 "10") xtitle("Voting Threshold ($0-$10)") legend(size(vsmall) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA12_Min2.gph", replace
restore

*Combining Graphs*
grc1leg "FigA12_Min1.gph" "FigA12_Min2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A12_B.pdf", as(pdf) replace

*******************************************************
*Figure A13. Elicited Preferences and Voting Thresholds
*******************************************************

*For each topic, need a subject's stated MAA and VT (there are two, since each subject saw each topic twice and stated a VT each time)*

*In each period, we can regress an individual's VT for a group on their MAA for that group*
preserve
keep if Treatment==1 | Treatment==5
recode Treatment (5=2)

gen case_id = _n

keep VT_IG1 VT_IG2 VT_IG3 MAA_Left MAA_Middle MAA_Right Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic 

reshape long MAA_, i(case_id) j(MAALocation) string

*Drop cases where no MAA was recorded (because the interest group was preferred)*
drop if missing(MAA_)
ren MAA_ MAA

*Then create a variable with matching voting thresholds*
gen VT=VT_IG1 if MAALocation=="Left"
replace VT=VT_IG2 if MAALocation=="Middle"
replace VT=VT_IG3 if MAALocation=="Right"

*We run without clustered SEs, as asmple size is too small to run command with clustering*
binsreg VT MAA i.Ses_num i.Period, by(Treatment) polyreg(1) bycolors(blue red) bysymbols(O T) nbins(7) legend(order(1 "Naturally-Occuring Ideologies" 3 "Induced Ideologies") region(lcolor(white)) size(vsmall)) ytitle("Voting Threshold ($0-$10)", size(small)) xtitle("MAA ($0-$5)", size(small))  scheme(s1color)
graph export "Figure A13.pdf", as(pdf) replace
restore

************************************************************************
*Table A13. Correlation between elicited preferences and voting behavior
************************************************************************

preserve
keep if Treatment==1 | Treatment==5
recode Treatment (1=0) (5=1)

gen case_id = _n

keep VT_IG1 VT_IG2 VT_IG3 MAA_Left MAA_Middle MAA_Right Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic 

reshape long MAA_, i(case_id) j(MAALocation) string

*Drop cases where no MAA was recorded (because the interest group was preferred)
drop if missing(MAA_)
ren MAA_ MAA

*Then create a variable with matching voting thresholds
gen VT=VT_IG1 if MAALocation=="Left"
replace VT=VT_IG2 if MAALocation=="Middle"
replace VT=VT_IG3 if MAALocation=="Right"

gen MAATrt=MAA*Treatment

est clear
qui eststo: reg VT MAA
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA Treatment MAATrt
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA Treatment MAATrt, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA Treatment MAATrt i.Period, cl(SubjectID)
	qui estadd scalar n = e(N)
qui eststo: reg VT MAA Treatment MAATrt i.Period i.Ses_num, cl(SubjectID)
	qui estadd scalar n = e(N)
			
estout using "Table A13.tex", replace ///
cells(b(fmt(%9.3f) star) se(par fmt(%9.3f))) style(tex) ///
stats(n, labels("\# Observations") ///
fmt(%9.3f %9.0f %9.0f)) ///
starlevels(* .10 ** .05 *** .01) ///
keep(MAA Treatment MAATrt) /// 
order(MAA Treatment MAATrt) /// 
varlabels (MAA "Stated Minimum Accepted Amount" Treatment "Induced Preferences Trt" MAATrt "MAA X Induced Preferences") ///
mlabels(none) collabels(none)
restore

*******************************************************
*Figure A14. Comparing Stated and Elicited Preferences*
*******************************************************

preserve
keep if Period==1 & Treatment<5

*Preference Direction*
egen Bargaining_PeakPref_All=rowmean(Group_Topic1 Group_Topic2 Group_Topic3 Group_Topic4)
lab var Bargaining_PeakPref_All "Average Revealed Preference Direction"

*Preference Intensity*
egen AvgMAA_All=rowmean(MAA1_T1 MAA2_T1 MAA1_T2 MAA2_T2 MAA1_T3 MAA2_T3 MAA1_T4 MAA2_T4)
lab var AvgMAA_All "Average Non-Preferred MAA: Pooled"

*A) Comparing with Self Reported Party Identification
cibar Bargaining_PeakPref_All, over(PartyID) graphopts(title("Preference Direction by Party ID") ytitle("Average Peak Preference: Left(1)-Right(3)") xtitle("Party ID") ylab(1 "1" 1.5 "1.5" 2 "2" 2.5 "2.5" 3 "3" 3.5 "3.5") graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) ) 
graph save "FigA14_A1.gph", replace

cibar AvgMAA_All, over(PartyID) graphopts(title("Preference Intensity by Party ID") ytitle("Average MAA: Weakest(1)-Strongest(5)") xtitle("Party ID") ylab(.5 ".5" 1 "1" 1.5 "1.5" 2 "2" 2.5 "2.5" 3 "3") graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)))
graph save "FigA14_A2.gph", replace

grc1leg "FigA14_A1.gph" "FigA14_A2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A14_A.pdf", as(pdf) replace

*B) Comparing with Self-Reported Ideology*

cibar Bargaining_PeakPref_All, over(Ideology) graphopts(title("Preference Direction by Ideology") ytitle("Average Peak Preference: Left(1)-Right(3)") xtitle("Ideology") ylab(1 "1" 1.5 "1.5" 2 "2" 2.5 "2.5" 3 "3" 3.5 "3.5") graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)))
graph save "FigA14_B1.gph", replace

cibar AvgMAA_All, over(Ideology) graphopts(title("Preference Intensity by Ideology") ytitle("Average MAA: Weakest(1)-Strongest(5)") xtitle("Ideology") ylab(.5 ".5" 1 "1" 1.5 "1.5" 2 "2" 2.5 "2.5" 3 "3") graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)))
graph save "FigA14_B2.gph", replace

grc1leg "FigA14_B1.gph"  "FigA14_B2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A14_B.pdf", as(pdf) replace

restore

***********************************************************************************
*Figure A15. Effects of Natural versus Artificial Preferences on Voting Thresholds*
***********************************************************************************

preserve
*Note: to facilitate comparison, we only include sessions that were repeated across both induced treatments*
keep if (Treatment==1 | Treatment==5 | Treatment==6) & Ses_mirror!=4 & Ses_num!=4 & Ses_num!=5 & Ses_num!=6 & GroupComp==2

*VT Preferred*
gen VT_Preferred_Real1=VT_Preferred if Treatment==1
gen VT_Preferred_Real=VT_Preferred if Treatment==6
gen VT_Preferred_Induced=VT_Preferred if Treatment==5

cumul VT_Preferred_Real1, gen(cVT_Preferred_Real1)
cumul VT_Preferred_Real, gen(cVT_Preferred_Real)
cumul VT_Preferred_Induced, gen(cVT_Preferred_Induced)

stack cVT_Preferred_Real1 VT_Preferred_Real1 cVT_Preferred_Real VT_Preferred_Real cVT_Preferred_Induced VT_Preferred_Induced, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred_Real1 "Natural Preferences"
lab var cVT_Preferred_Real "Induced Preferences (Neutral Frame)"
lab var cVT_Preferred_Induced "Induced Preferences (Loss Frame)"

sort cVT_Preferred_Real1 cVT_Preferred_Real cVT_Preferred_Induced
line cVT_Preferred_Real1 cVT_Preferred_Real cVT_Preferred_Induced VT, title("Preferred Policy") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(tiny) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA15_1.gph", replace

restore

*VT non-Preferred*
preserve
keep if (Treatment==1 | Treatment==5 | Treatment==6) & Ses_mirror!=4 & Ses_num!=4 & Ses_num!=5 & Ses_num!=6 & GroupComp==2

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

gen VT_NonPreferred_Real1=VT_NonPreferred if Treatment==1
gen VT_NonPreferred_Real=VT_NonPreferred if Treatment==6
gen VT_NonPreferred_Induced=VT_NonPreferred if Treatment==5

cumul VT_NonPreferred_Real1, gen(cVT_NonPreferred_Real1)
cumul VT_NonPreferred_Real, gen(cVT_NonPreferred_Real)
cumul VT_NonPreferred_Induced, gen(cVT_NonPreferred_Induced)

stack cVT_NonPreferred_Real1 VT_NonPreferred_Real1 cVT_NonPreferred_Real VT_NonPreferred_Real cVT_NonPreferred_Induced VT_NonPreferred_Induced, into(c VT) wide clear
drop if missing(VT)

lab var cVT_NonPreferred_Real1 "Natural Preferences"
lab var cVT_NonPreferred_Real "Induced Preferences (Neutral Frame)"
lab var cVT_NonPreferred_Induced "Induced Preferences (Loss Frame)"

sort cVT_NonPreferred_Real1 cVT_NonPreferred_Real cVT_NonPreferred_Induced
line cVT_NonPreferred_Real1 cVT_NonPreferred_Real cVT_NonPreferred_Induced VT, title("Non-Preferred Policy") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(tiny) rows(1)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA15_2.gph", replace

restore

*Combining Graphs*
grc1leg "FigA15_1.gph" "FigA15_2.gph", graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A15.pdf", as(pdf) replace

************************************************************************************
****Figure A16. Voting Thresholds by Non-Preferred Interest Group Type (Induced)****
************************************************************************************

*1.) First, for full sample, preferred versus non-preferred interest groups*
preserve
keep if Treatment==5

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("A. Full Sample") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA16_1.gph", replace
restore

*2.) Second, comparison of closest versus furthest non-preferred with preferred*
preserve
keep if Treatment==5 & (MAA1 != MAA2) & MAA1!=. & MAA2!=.

gen VT_NonP_Closest=VT_IG1 if (Bargaining_PeakPref!=1) & ((Bargaining_PeakPref==3 & (MAA2 < MAA1)) | (Bargaining_PeakPref==2 & (MAA1 < MAA2)))
replace VT_NonP_Closest=VT_IG2 if (Bargaining_PeakPref!=2) & ((Bargaining_PeakPref==3 & (MAA1 < MAA2)) | (Bargaining_PeakPref==1 & (MAA1 < MAA2)))
replace VT_NonP_Closest=VT_IG3 if (Bargaining_PeakPref!=3) & ((Bargaining_PeakPref==1 & (MAA2 < MAA1)) | (Bargaining_PeakPref==2 & (MAA2 < MAA1)))

gen VT_NonP_Furthest=VT_IG1 if (Bargaining_PeakPref!=1) & ((Bargaining_PeakPref==3 & (MAA2 > MAA1)) | (Bargaining_PeakPref==2 & (MAA1 > MAA2)))
replace VT_NonP_Furthest=VT_IG2 if (Bargaining_PeakPref!=2) & ((Bargaining_PeakPref==3 & (MAA1 > MAA2)) | (Bargaining_PeakPref==1 & (MAA1 > MAA2)))
replace VT_NonP_Furthest=VT_IG3 if (Bargaining_PeakPref!=3) & ((Bargaining_PeakPref==1 & (MAA2 > MAA1)) | (Bargaining_PeakPref==2 & (MAA2 > MAA1)))

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonP_Closest, gen(cVT_NonP_Closest)
cumul VT_NonP_Furthest, gen(cVT_NonP_Furthest)

stack cVT_Preferred VT_Preferred cVT_NonP_Closest VT_NonP_Closest cVT_NonP_Furthest VT_NonP_Furthest, into(c VT) wide clear
drop if missing(VT)

lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonP_Closest "(Closest) Non-Preferred Interest Group"
lab var cVT_NonP_Furthest "Furthest Non-Preferred Interest Group"

sort cVT_Preferred cVT_NonP_Closest cVT_NonP_Furthest

line cVT_Preferred cVT_NonP_Closest cVT_NonP_Furthest VT, title("B. Non-Neutral (MAAs Unequal)") ylab(, grid) ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 

graph save "FigA16_2.gph", replace

restore

*Third, for those with equal, non-zero MAAs for alternative groups, preferred versus non-preferred

preserve
keep if Treatment==5 & (MAA2 == MAA1) & MAA1!=0 & MAA2!=0 & MAA1!=. & MAA2!=.

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("C. Neutral (MAAs>0)") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA16_3.gph", replace

restore

*Fourth, for those with equal, zero MAAs for alternative groups, preferred versus non-preferred
preserve
keep if Treatment==5 & (MAA2 == MAA1) & MAA1==0 & MAA2==0

gen case_id = _n

gen VT_New_NonPreferred_One=VT_IG1 if Bargaining_PeakPref==2 | Bargaining_PeakPref==3
replace VT_New_NonPreferred_One=VT_IG3 if Bargaining_PeakPref==1

gen VT_New_NonPreferred_Two=VT_IG2 if Bargaining_PeakPref==3 | Bargaining_PeakPref==1
replace VT_New_NonPreferred_Two=VT_IG3 if Bargaining_PeakPref==2

keep VT_New_NonPreferred_One VT_New_NonPreferred_Two Bargaining_PeakPref Treatment SubjectID case_id Period Ses_num GroupComp InMajority Topic VT_Preferred VT_NonPreferred

reshape long VT_New_, i(case_id) j(VTNonPref_Location) string

drop VT_NonPreferred
ren VT_New_ VT_NonPreferred

cumul VT_Preferred, gen(cVT_Preferred)
cumul VT_NonPreferred, gen(cVT_NonPreferred)
stack cVT_Preferred VT_Preferred cVT_NonPreferred VT_NonPreferred, into(c VT) wide clear
lab var cVT_Preferred "Preferred Interest Group"
lab var cVT_NonPreferred "Non-Preferred Interest Group"
sort cVT_NonPreferred cVT_Preferred
line cVT_Preferred cVT_NonPreferred VT, ylab(, grid) title("D. Neutral (MAAs=0)") ytitle("Cumulative Probability") xlab(, grid) xtitle("Voting Threshold ($0-$10)") legend(size(vsmall)) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph save "FigA16_4.gph", replace

restore

*Combining Graphs*
grc1leg "FigA16_1.gph" "FigA16_2.gph" "FigA16_3.gph" "FigA16_4.gph", legendfrom("FigA16_2.gph" ) graphregion(fcolor(white) icolor(white) lcolor (white) ilcolor(white) ifcolor(white)) 
graph export "Figure A16.pdf", as(pdf) replace
